﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
using System.Diagnostics;

namespace WorkflowManagement.Web.UI
{
    /// <summary>
    /// A collection of <see cref="WorkflowTrigger">triggers</see>.
    /// </summary>
    public class WorkflowTriggerCollection: Collection<WorkflowTrigger>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="WorkflowTriggerCollection"/> class.
        /// </summary>
        public WorkflowTriggerCollection()
        {
        }

        /// <summary>
        /// Initializes the specified manager.
        /// </summary>
        /// <param name="manager">The manager.</param>
        internal void Initialize(WorkflowManagerBase manager)
        {
            Debug.Assert(manager != null);
            
            foreach (WorkflowTrigger trigger in this)
                trigger.Initialize(manager);
        }
    }
}
